package org.skycastle.megastructure
/**
 * 
 *
 * @author Hans Haggstrom
 */

class Shot extends Entity( new Ball( 0.5f, "images/plasma.png" ) ) {

  private var totalTime_s = 0f
  private val ShotLifetime_s = 5f

  override def update(timeSinceLastTime_s: Float) {

    super.update( timeSinceLastTime_s )

    // TODO: Ability to change appearance on the fly

    totalTime_s += timeSinceLastTime_s

    if (totalTime_s > ShotLifetime_s)
      space.removeEntity( this )
  }
}